﻿/**************************************************************
 * Project     : Titan Framework
 * Copyright (C) 2011 Microsoft Corp.
 * Author      : Julian Hu
 * Mail        : junhu@microsoft.com
 * Create Date : 2011-05-09
 * Summary     :   
 * 
 * 
 * Modified By : 
 * Date        : 
 * Mail        : 
 * Comment     :   
 * *************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;

namespace Titan.Excepting
{
    class ExceptionHelper
    {
        public static bool HandleException(Exception ex,string policyname)
        {
            bool result = false;

            result = ExceptionPolicy.HandleException(ex, policyname);

            return result;
        }

        public static bool HandleException(Exception ex, string policyname,out Exception exceptionToThrow){
            bool result= false;
            Exception outException = new Exception();

            result = ExceptionPolicy.HandleException(ex, policyname, out outException);

            exceptionToThrow = outException;
            return result;
        }

        


        
    }
}
